Skip to content

Report why a simulation setup library cannot be loaded - #16089

Merged
sawenzel merged 1 commit into
AliceO2Group:devfrom
sawenzel:swenzel/g4-static-tls
Nov 9, 2026
Merged

sawenzel merged 1 commit into
AliceO2Group:devfrom
sawenzel:swenzel/g4-static-tls

Conversation

@sawenzel

@sawenzel sawenzel commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

A failed dlopen of the engine setup library (libO2G4Setup and friends) stopped at assert(libHandle), without saying why. The message now gives the dlopen error, for example when Geant4 is built with the initial-exec TLS model and the static TLS reserve is too small:

[FATAL] Cannot load libO2G4Setup.so: .../libG4geometry.so: cannot allocate memory in static TLS block

The library is opened once, with the platform suffix from DLLoaderBase.h. A fair::FatalException follows the fatal message, because LOG(fatal) ends the process only when a fatal handler is installed.

https://its.cern.ch/jira/browse/O2-7305

Assisted by Claude Code.

@sawenzel
sawenzel requested a review from a team as a code owner November 9, 2026 13:36
@sawenzel sawenzel changed the title Prepare o2-sim for Geant4 with the initial-exec TLS model Report why a simulation setup library cannot be loaded Nov 9, 2026
@sawenzel
sawenzel force-pushed the swenzel/g4-static-tls branch 2 times, most recently from 609f085 to f0e2ce6 Compare November 9, 2026 14:29
This replaces the asserts in execFromPlugin by fatal messages with the reason.

- A failed dlopen of libO2G4Setup and friends stopped at assert(libHandle), without the error from dlerror().
- The message now gives the dlopen error, e.g. a missing static TLS reserve for Geant4 built with the initial-exec TLS model.
- The library is opened once, with the platform suffix from DLLoaderBase.h.
- A fair::FatalException follows the fatal message, since LOG(fatal) ends the process only when a fatal handler is installed.

https://its.cern.ch/jira/browse/O2-7305

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sawenzel
sawenzel force-pushed the swenzel/g4-static-tls branch from f0e2ce6 to 60561f6 Compare November 9, 2026 14:39
@sawenzel
sawenzel merged commit de37b14 into AliceO2Group:dev Nov 9, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant